<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::any('','SanPhamController@ds');
Route::get('/details/{id}','SanPhamController@productDetails');
Route::get('/checkout','SanPhamController@ViewCheckOut');
//-------------------Backend
Route::any('/admin/sanpham','SanPhamController@show');
Route::get('/admin/sanpham/add','SanPhamController@add');
Route::post('/admin/sanpham/add','SanPhamController@store');
Route::get('/admin/sanpham/edit/{id}','SanPhamController@edit');
Route::post('/admin/sanpham/edit/{id}','SanPhamController@update');
Route::get('/admin/sanpham/delete/{id}','SanPhamController@destroy');
